@layout("/common/_container.html"){
<style>.imageBox > div{flex:1;}.imageBox > div select{width:60%;height:28px;}.btnBox{position:fixed;bottom:0;width:100%;padding:10px 0;text-align:center;}.btnBox>button{margin:0;color:white;background:#2b6594;padding:3px 24px;}</style>
<div class="ibox float-e-margins">
    <div style="display: none">
        <input type="hidden" id="reservationsId" value="${reservationsId}">
        <input type="hidden" id="customerId" value="${customerId}">
        <input type="hidden" id="doctor" value="${doctor}">
    </div>
    <div>
        <div style="background: #6090b8;color: white;padding: 5px 10px;">看诊项目</div>
        <div style="padding:20px 15px 10px;display: flex" class="imageBox">
            <div>
                <span>就诊时间：</span>
                <select name="finnallyTime" id="finnallyTime">
                    @for(item in customerList){
                    <option value="${item.arrivalTime}">${item.arrivalTime}</option>
                    @}
                </select>
            </div>
            <div>
                <span>选择项目：</span>
                <select name="payServiceId" id="payServiceId">
                    <option value="">请选择</option>
                    @for(item in reservationsInfo){
                    <option value="${item.payServiceId}">${item.payServiceName}</option>
                    @}
                </select>
            </div>
        </div>
        <div class="btnBox">
            <button class="btn" type="button" id="subbmit12">确定</button>
            <button class="btn" type="button" onclick="parent.layer.close(parent.layer.getFrameIndex(window.name))">取消</button>
        </div>
    </div>
</div>
<script>
        $("#subbmit12").click(function () {
            var customerId = $("#customerId").val();
            var reservationsId = $("#reservationsId").val();
            var doctor = $("#doctor").val();
            var optionName=$("#payServiceId option:selected").text();
            var finnallyTime=$("#finnallyTime option:selected").text();
            $.ajax({
                url: Feng.ctxPath + "/doctorLooked/save_payName",
                type: "post",
                data: {
                    customerId: customerId,
                    reservationsId: reservationsId,
                    optionName: optionName,
                    doctor: doctor,
                    finnallyTime: finnallyTime
                },
                success: function (data) {
                    Feng.success('操作成功!');
                    parent.layer.close(parent.layer.getFrameIndex(window.name));
                },
                error: function (data) {
                    alert('没有权限，请联系管理员!');
                }
            });
        });
</script>
@}
